package dlwntk6545.swing.outline;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JOptionPane;

public class J07_HelloSwingActionListener implements ActionListener{
	
	
	
	public static void main(String[] args) {
		
		
		
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		
		System.out.println(e.getActionCommand());
		
		switch(e.getActionCommand()){
			
			case "new" : 
				JOptionPane.showMessageDialog(null, "new 메뉴가 클릭 되었슴돠"); break;
			case "close" : 
				JOptionPane.showMessageDialog(null, "close 메뉴가 클릭 되었슴돠"); break;
			case "exit" : 
				JOptionPane.showMessageDialog(null, "exit 메뉴가 클릭 되었슴돠"); break;
			
		}
		
	}

}
